<?php

namespace XYWY\Controller;

/**
 * AboutController类
 *
 * @since 1.0 <2015-10-21> SoChishun <14507247@qq.com> Added.
 */
class AboutUsController extends AppbaseController {

    public function index($id = 3) {
        switch ($id) {
            case 6:
            case 8:
            case 9:
                redirect(U('photos', 'id=' . $id));
                break;
            case 10:
                redirect(U('Analyst/index', 'id=' . $id));
                break;
        }
        $data = DXA('POrgDocument/DocumentCategoryContent')->find($id);
        $this->assign('data', $data);
        $this->display();
    }

    function photos($id = 6) {
        $news_list = DXA('POrgDocument/File')->get_paging_list(array('category_id' => $id), $show);
        $this->assign('news_list', $news_list);
        $title = DXA('POrgDocument/DocumentCategory')->where(array('id' => $id))->getField('title');
        $this->assign('title', $title);
        $this->display();
    }

}
